package trash.Test;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface Annotation {

    public boolean value() default false;

}

@Annotation(value=true)
class TestClass {

}

public class AnnotationTest {

    public static void main(String[] args) {
        TestClass testClass = new TestClass();

        Annotation annotation = testClass.getClass().getAnnotation(Annotation.class);
        if (annotation != null) {
            System.out.printf("value: %s \n", annotation.value());
        }
    }
}